﻿using System;
using System.Collections.Generic;

using RexToy.IoC;

namespace Studio.Model
{
    public static class KernalFactory
    {
        private static Dictionary<string, IKernal> _kernals = new Dictionary<string, IKernal>();
        public static IKernal Create(string key)
        {
            if (!_kernals.ContainsKey(key))
            {
                IKernal k = new Kernal(key);
                _kernals[key] = k;
            }

            return _kernals[key];
        }
    }
}
